﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////


#pragma once
#include "GcmpModelInterface.h"
#include "IExternalObject.h"
#include "NdbDataSchema.h"
#include "ElementCreationOptions.h"

namespace gcmp
{
    class IRevisionCloudType;
    class IExternalDatas;

    class GCMP_MODEL_INTERFACE_EXPORT IRevisionCloud : public IExternalObject
    {
        DECLARE_CLASS_WITHOUT_DATA_MEMBERS(gcmp, IRevisionCloud, gcmp::IExternalObject, EA9E050C - F951 - 8520 - 65AD - B219FF2F186E, gcmpmodelinterface);
    public:
        virtual ~IRevisionCloud();

    public:
        static const int GraphicsNodeId_Annotation = 1;  //云线注释图形ID
        static const int GraphicsNodeId_Version = 2;     //云线版本图形ID               
        /// \brief 创建矩形云线
        /// \param[in]    IDocument* pDocument
        /// \param[in]    const ElementId& modelViewId
        /// \param[in]    const ElementId& typeId 云线type的id
        /// \param[in]    const Vector3d& ptCenter 中心点
        /// \param[in]    double dWidth 宽度
        /// \param[in]    double dHeight 高度
        /// \param[in]    ElementCreationOptions eco = ElementCreationOptions::Normal
        /// \return       IRevisionCloud* 
        static IRevisionCloud* CreateRectRevCloud(IDocument* pDocument, const ElementId& modelViewId, const ElementId& typeId, const Vector3d& ptCenter, double dWidth,double dHeight, ElementCreationOptions eco = ElementCreationOptions::Normal);
        
        /// \brief 创建圆形云线
        /// \param[in]    IDocument* pDocument
        /// \param[in]    const ElementId& modelViewId
        /// \param[in]    const ElementId& typeId 云线type的id
        /// \param[in]    const Vector3d& ptCenter 圆中心点
        /// \param[in]    double dRadius 半径
        /// \param[in]    ElementCreationOptions eco = ElementCreationOptions::Normal
        /// \return       IRevisionCloud*
        static IRevisionCloud* CreateCircleRevCloud(IDocument* pDocument, const ElementId& modelViewId, const ElementId& typeId, const Vector3d& ptCenter, double dRadius, ElementCreationOptions eco = ElementCreationOptions::Normal);

        /// \brief 获取云线所属视图
        ///
        /// \return 返回云线所属视图
        virtual ElementId GetModelViewId() const = 0;

        /// \brief 设置云线所属视图
        ///
        /// \param modelViewId 云线所属视图的Id
        /// \return 返回true表示成功，false表示失败
        virtual bool SetModelViewId(const ElementId& modelViewId) = 0;

        /// \brief 获取云线type的ElementID
        /// \return       ElementId
        virtual ElementId GetTypeId() const = 0;

        /// \brief  获取云线type的指针
        /// \return  const IRevisionCloudType*
        virtual const IRevisionCloudType* GetType() const  = 0;
        
        /// \brief 设置云线type的elementid
        /// \param[in]    const ElementId& typeId
        /// \return       bool
        virtual void SetTypeId(const ElementId& typeId) =0;

        /// \brief 获取扩展数据集合
        /// \return       const
        virtual const IExternalDatas* GetExternalDatas() const  = 0;

        /// \brief 获取扩展数据集合
        /// \return       IExternalDatas*
        virtual IExternalDatas* GetExternalDatas() = 0;
 
        /// \brief 获取注释标记是否显示
        /// \return       Bool
        virtual Bool GetVisibleAnnotationMarker() const = 0;

        /// \brief 设置注释标记是否显示
        /// \param[in]    Bool isVisible
        virtual void SetVisibleAnnotationMarker(Bool isVisible) = 0;

        /// \brief 设置注释标记点的位置
        /// \param[in]    const Vector3d& pos 位置
        virtual void SetAnnotationMarkerPosition(const Vector3d& pos) = 0;

        /// \brief 获得注释标记点的位置
        /// \return       Vector3d
        virtual Vector3d GetAnnotationMarkerPosition() const = 0;

        /// \brief 获取版本标记是否显示
        /// \return       Bool
        virtual Bool GetVisibleVersionMarker() const = 0;

        /// \brief 设置版本标记是否显示
        /// \param[in]    Bool isVisible
        virtual void SetVisibleVersionMarker(Bool isVisible) = 0;

        /// \brief 设置版本标记点的位置
        /// \param[in]    const Vector3d& pos 位置
        virtual void SetVersionMarkerPosition(const Vector3d& pos) = 0;

        /// \brief 获得版本标记点的位置
        /// \return       Vector3d
        virtual Vector3d GetVersionMarkerPosition() const= 0;

        /// \brief 获取引线标记是否显示
        /// \return       Bool
        virtual Bool GetVisibleNullMarker() const = 0;
        
        /// \brief 设置引线标记是否显示
        /// \param[in]    Bool isVisible
        virtual void SetVisibleNullMarker(Bool isVisible) = 0;

        /// \brief 设置引线标记点的位置
        /// \param[in]    const Vector3d& pos 位置
        virtual void SetNullMarkerPosition(const Vector3d& pos) = 0;

        /// \brief 获得引线标记点的位置
        /// \return       Vector3d
        virtual Vector3d GetNullMarkerPosition() const = 0;

        /// \brief 修改注释文字
        /// \param[in]    const std::wstring& strAnnotationText
        virtual void ChangeAnnotationText(const std::wstring& strAnnotationText) =0;

        /// \brief 修改版本标记
        /// \param[in]    int nVersion
        virtual void ChangeVersionNumber(int nVersion)=0;

        /// \brief 获取注释文字
        /// \return       std::wstring
        virtual std::wstring GetAnnotationText() const = 0;
        
        /// \brief 获取版本标记
        /// \return       int
        virtual int GetVersionNumber() const = 0;

        /// \brief 设置引线标记连接的云线ID
        /// \param[in]    const ElementId& revisionCloudID
        virtual void SetJointRevisionCloud(const ElementId& revisionCloudID) = 0;

        /// \brief 获取引线标记连接的云线ID
        /// \return       ElementId
        virtual ElementId GetJointRevisionCloud() const = 0;
        
        /// \brief 设置版本标记三角形高度与字体的倍数关系
        /// \param[in]    int nMultiple （取值范围，1.0~5.0）
        virtual void SetMultipleVersionCharHeight(float fMultiple) =0;

        /// \brief 获取Implementation Uid
        ///
        /// \return UniIdentity 返回ImplementationUid
        static UniIdentity GetImplementationUid();
    };
}
